
#include"udpserver.hpp"
using namespace udpServer;
static void startrouine(string proc)
{
    cout<<"\nstartroutine\n\t" <<proc<<" serverport"<<endl;
}


int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        startrouine(argv[0]);
        exit(USAGE_ERR);
    }

  //  string serverip=argv[1];
     uint16_t serverport=atoi(argv[1]);//atoi作用：把port的str类型转化成int类型。而uin16_t本质类型是int

unique_ptr<udpserver> uct(new udpserver(serverport));

uct->initServer();
uct->start();

    return 0;
}